<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" type="text/javascript" src="./javaScript/viewCartList.js"></script>

<title>장바구니 목록보기</title>


</head>
<body>
<table width='100%'>

	<!-- HEADER:str -->
	<tr>
		<td align="center" width=300>
			<%@ include file="/WEB-INF/jsp/include/logo.jsp"%>
		</td>
		<td align="center" bgcolor="#F5F5F5">
			<%@ include file="/WEB-INF/jsp/include/top_menu.jsp"%>
		</td>
	</tr>
	<!-- HEADER:end -->
	
		<!-- LEFT:str -->
		<tr>
		<td valign="top">
			<%@ include file="/WEB-INF/jsp/include/left_menu.jsp"%>
		</td>
		<!-- LEFT:end -->
		
		<!-- CONTENT:str -->
		<td valign="top">
			<form id="cartForm" name="cartForm" method="post" align='center'>
		<table align ='center' border='1' cellpadding='0' cellspacing='1' frame='void' width='100%'>
			<colgroup>
				<col width="5%" />
				<col width="10%" />
				<col width="25%" />
				<col width="15%" />
				<col width="10%" />
				<col width="10%" />
				<col width="10%" />
				<col width="15%" />
			</colgroup>
			<thead>
				<tr>
				    <th><input type='checkbox' id='selectBookWhole' onclick='AllChkList(this)'></th>
				    <th></th>
					<th>도서명</th>
					<th>작가</th>
					<th>출판사</th>
					<th>가격</th>
					<th>수량</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
			<c:forEach items="${cartBookList}" var="list" varStatus="loop">
				<tr align='center'>
					<td align='center'><input type='checkbox' name='checkId'>
					<input type="hidden" id="bookId" name="bookId" value="${list.bookId}"></td>
					<td><img src="./images/book/${list.bookId}.jpg"/></td>
					<td>${list.title}</td>
				    <td>${list.author}</td>
					<td>${list.publisher}</td>
					<td>${list.price}</td>
					<td><input type='text' id='qty' name='qty' size='5' value='${list.qty}'></td>
					<td><input type='button' id='' value='주문하기'/><br>
						<input type='button' id='' onclick="removeCartOne('${list.bookId}');" value='삭제하기'/></td>
				</tr>
		</c:forEach>
		<c:if test="${empty cartBookList}">
			<tr>
				<td colspan="8">장바구니가 비어있습니다.</td>
			</tr>
		</c:if>
			<tr>
				<td colspan="8" align='right'>
				<br><input type='button' value='선택한 도서 주문'><input type='button' value='선택한 도서 삭제'></td>
			</tr>


			</tbody>
			
		</table>
		
	</form>

		</td>
	</tr>
	<!-- CONTENT:str -->
	
			
	
</table>
</body>
</html>